$OpenBSD: patch-tests_libpeas_extension-py_c,v 1.2 2015/05/14 18:20:34 jasper Exp $

From f5c7668f600f16f144c3772cc34c9fd929f98d28 Mon Sep 17 00:00:00 2001
From: Garrett Regier <garrettregier@gmail.com>
Date: Tue, 12 May 2015 04:48:42 -0700
Subject: Fix Python tests on OpenBSD

--- tests/libpeas/extension-py.c.orig	Sat Feb 14 21:35:54 2015
+++ tests/libpeas/extension-py.c	Tue May 12 14:33:39 2015
@@ -180,11 +180,19 @@ test_extension_py_already_initialized_subprocess (void
 static void
 test_extension_py_mixed_python (void)
 {
+  GTestSubprocessFlags flags = 0;
+
+  /* Loading both Python 2 and Python 3 might cause
+   * the linker to spew warnings, i.e. on OpenBSD, so
+   * only inherit standard error when debugging
+   */
+  if (g_getenv ("PEAS_DEBUG") != NULL)
+    flags |= G_TEST_SUBPROCESS_INHERIT_STDERR;
+
   g_test_trap_subprocess (EXTENSION_TEST_NAME (PY_LOADER,
                                                "mixed-python/subprocess"),
-                          0, G_TEST_SUBPROCESS_INHERIT_STDERR);
+                          0, flags);
   g_test_trap_assert_passed ();
-  g_test_trap_assert_stderr ("");
 }
 
 static void
